package com.application.TextNode;

import android.app.Application;
import android.content.Context;
import android.view.Display;
import android.view.WindowManager;

public class MESApplication extends Application{
	 private static Context context;

	    public void onCreate(){
	        super.onCreate();
	        MESApplication.context = getApplicationContext();
	    }

	    public static Context getAppContext() {
	        return MESApplication.context;
	    }
	    public static int getWidth(){
	    	WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
	    	Display display = wm.getDefaultDisplay();
	    	return display.getWidth();
	    }
	    public static int getHeight(){
	    	WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
	    	Display display = wm.getDefaultDisplay();
	    	return display.getHeight();
	    }
}
